package com.cyzy.controller;

import com.cyzy.domain.ShoppingCar;
import com.cyzy.dto.ResponseData;
import com.cyzy.service.ShoppingCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/ShoppingCar")
public class ShoppingCarController {
    @Autowired
    private ShoppingCarService shoppingCarService;

    @PostMapping("/addCar")
    //
    public ResponseData addCar(@RequestBody ShoppingCar shoppingCar) {
        return shoppingCarService.addCar(shoppingCar);
    }
    @GetMapping("/findCar")
    //我是大帅哥
    public ResponseData findCar(String userId) {
        return shoppingCarService.findCar(userId);
    }
}
